/*
 * 百度在线网络技术（北京）有限公司拥有本软件版权2021并保留所有权利。
 * Copyright 2021, Baidu.com,Inc 2:Baidu Online Network Technology (Beijing) Co.,Ltd,
 * All rights reserved.
 */

package com.azdebugit.jvm.zhuangtaiji._2;

import org.squirrelframework.foundation.fsm.impl.AbstractStateMachine;

import java.text.MessageFormat;

public class StateMachine extends AbstractStateMachine<StateMachine, State, Event, Context> {

    private void approvePassAction(State from, State to, Event event, Context context) {
        System.out.println(MessageFormat.format("审批人{0}审批了价格，审批结果为通过", context.getParam()));
        //TODO 将审批状态更新为已审核通过
    }

    private void approveRefusedAction(State from, State to, Event event, Context context) {
        System.out.println(MessageFormat.format("审批人{0}审批了价格，审批结果为拒绝", context.getParam()));
        //TODO 将审批状态更新为审核拒绝
    }

    private void recheckPassAction(State from, State to, Event event, Context context) {
        System.out.println(MessageFormat.format("审批人{0}对未审核通过的价格进行复核，审批结果为通过", context.getParam()));
        //TODO 将审批状态更新为审核通过
    }

    private void recheckRefusedAction(State from, State to, Event event, Context context) {
        System.out.println(MessageFormat.format("审批人{0}对未审核通过的价格进行复核，审批结果为不通过", context.getParam()));
        //TODO 将审批状态更新为审核不通过
    }
}

